<template>
  <div class="article-page">
    <div>
      <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
  <van-swipe-item><img src="../picture/1.png" alt="" style="width: 100%; height: 212px; vertical-align: top;"></van-swipe-item>
  <van-swipe-item><img src="../picture/2 (1).png" alt="" style="width: 100%; height: 212px; vertical-align: top;"></van-swipe-item>
  <van-swipe-item><img src="../picture/3.png" alt="" style="width: 100%; height: 212px; vertical-align: top;"></van-swipe-item>
</van-swipe>
    </div>
    <div>
      <van-grid>
  <van-grid-item icon="photo-o" text="整租" />
  <van-grid-item icon="friends-o" text="合租" />
  <van-grid-item icon="map-marked" text="地图找房" />
  <van-grid-item icon="photo-o" text="去出租" />
</van-grid>
    </div>
 <div class="search">
  <div class="city" @click="$router.push('/city')">
   广州<van-icon name="play" class="list" />
  </div>
  |
  <van-search
   class="ipt"
   v-model="value"
   placeholder="请输入小区或地址"
   @click='onSearch'
  />
 </div>
  </div>
</template>

<script>
import { Toast } from 'vant';
export default {
  name: 'article-page',
    data() {
    return {
      value: '',
    };
  },
  methods: {
    onSearch(val) {
      Toast(val);
      this.$router.push('/map')
    },
    onCancel() {
      Toast('取消');
    },
  },
}
</script>

<style lang="less" scoped>
  .search {
    display: flex;
    z-index: 999;
position: absolute;
top: 22px;
left: 50%;
width: 320px;
height: 35px;
margin-left: -160px;
background-color:#fff;
border-radius: 3px;
line-height: 35px;
color: #ccc;
font-size: 20px;
.city{
  margin-left: 10px;
color:#333;
height: 35px;
line-height: 35px;font-size: 14px;
.list {
  font-size: 12px;color: #666;
transform: rotate(90deg);
}
}
  }
  .ipt {
    width: 200px;
height: 35px;
background-color:#fff;
input {
  background-color: #fff;
}
  }
  
  .my-swipe .van-swipe-item {
    color: #fff;
    font-size: 10px;
    line-height: 100px;
    text-align: center;
    background-color: #39a9ed;
  }
.article-page {
  margin-bottom: 50px;
  // margin-top: 44px;
  .my-nav {
    height: 44px;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    z-index: 999;
    background: #fff;
    display: flex;
    align-items: center;
    > a {
      color: #999;
      font-size: 14px;
      line-height: 44px;
      margin-left: 20px;
      position: relative;
      transition: all 0.3s;
      &::after {
        content: "";
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        bottom: 0;
        width: 0;
        height: 2px;
        background: #222;
        transition: all 0.3s;
      }
      &.active {
        color: #222;
        &::after {
          width: 14px;
        }
      }
    }
    .logo {
      flex: 1;
      display: flex;
      justify-content: flex-end;
      > img {
        width: 64px;
        height: 28px;
        display: block;
        margin-right: 10px;
      }
    }
  }
}
</style>
